<!DOCTYPE html>
<html lang="en">

<head>
    <!--余枭春-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加试卷试卷题目</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/popper.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/vue.js"></script>
    <script type="text/javascript" src="../js/axios.js"></script>
    <style>
        tr {
            height: 6px;
            border-bottom: 1px lightgray solid;
            font-size: smaller;
        }

        #singleDiv:active {
            background-color: #00ccff;
        }

        #multipleDiv:active {
            background-color: #00ccff;
        }

        #trueOrFalseDiv:active {
            background-color: #00ccff;
        }

        #blankFillingDiv:active {
            background-color: #00ccff;
        }

        #shortAnswerDiv:active {
            background-color: #00ccff;
        }

        table {
            width: 100%;
        }

        thead tr {
            background-color: aliceblue;
        }

        thead tr td {
            text-align: center;
            border: lightblue 1px solid;
            font-size: 13px;
            color: blue;
        }

        tbody tr td {
            text-align: center;
            border: lightblue 1px solid;
            font-size: small;
            color: red;
        }

        td span {
            color: #0060ff;
        }

        .table tr:first-of-type span:nth-child(1) {
            display: none;
        }

        .table tr:last-of-type span:nth-child(3) {
            display: none;
        }

        #addSingleChoiceTable tr:first-of-type span:nth-child(1) {
            display: block;
        }

        #addmultipleChoiceTable tr:first-of-type span:nth-child(1) {
            display: block;
        }

        #addTrueOrFalseTable tr:first-of-type span:nth-child(1) {
            display: block;
        }

        #addblankFillingTable tr:first-of-type span:nth-child(1) {
            display: block;
        }

        #addshortAnswerTable tr:first-of-type span:nth-child(1) {
            display: block;
        }

        .addQuestion {
            display: block;
            color: #0060ff;
        }

        .addQuestion:active {
            color: blue;
        }

        tfoot tr {
            border: 0px;
        }
    </style>
</head>

<body>
<div id="app" class="container" style="padding: 100px 20px 10px;">
    <!-- 顶部结构 -->
    <div class="input-group">
        <div class="col-sm-6">
            <div class="input-group">
                <div class="col-sm-1">
                    <div style="border: 1px #0060ff solid;border-radius: 50%;width: 30px;height: 30px;text-align: center; color: #0060ff;">
                        <h4>√</h4>
                    </div>
                </div>
                <div class="col-sm-4" style="color: #0060ff;">
                    <h5>基本信息</h5>
                </div>
            </div>
        </div>

        <div class="col-sm-6">
            <div class="input-group">
                <div class="col-sm-1">
                    <div style="border: 1px #0060ff solid;border-radius: 50%;width: 30px;height: 30px;text-align: center; color: white;background-color: #0060ff;">
                        <h4>2</h4>
                    </div>
                </div>
                <div class="col-sm-4">
                    <h5>试卷题目</h5>
                </div>
            </div>
        </div>
    </div>
    <!-- 间隔 -->
    <div style="margin-top:50px;margin-bottom: 50px;"></div>
    <!-- 试卷 -->
    <div class="input-group">
        <!-- 左边放置试卷结构 -->
        <div id="left" class="col-sm-4" style="height: 400px;">
            <div id="top" style="margin-bottom: 20px;">
                <span style="font-size: medium;">试卷内容:&nbsp;&nbsp;试题数：<span style="color: blue;font-size: larger;">{{paperStructure.questionTotalNum}}</span>&nbsp;&nbsp;试卷总分：<span
                        style="color:blue;font-size: larger;">{{paperStructure.questionTotalScore}}</span></span>
            </div>
            <div id="structure" class="col-sm-8"
                 style="border: lightgray 1px solid;border-radius: 5%; float: right;padding: 5px;font-size: 14px;">
                <div id="singleDiv"
                     style="border-bottom: 1px lightgray solid;width: 100%;margin: 1px;float: left;background-color: #00ccff;"
                     @click="loadQuestions(1)"><span style="margin: 1%;margin-left: 5%;">单选题（{{paperStructure.singleChoiceNum}}）</span><span
                        style="float: right;margin: 1%;margin-right: 20%;">{{paperStructure.singleChoiceScore}}</span>
                </div>
                <div id="multipleDiv" style="border-bottom: 1px lightgray solid;width: 100%;margin: 1px;float: left;"
                     @click="loadQuestions(2)"><span style="margin: 1%;margin-left: 5%;">多选题（{{paperStructure.multipleChoiceNum}}）</span><span
                        style="float: right;margin: 1%;margin-right: 20%;">{{paperStructure.multipleChoiceScore}}</span>
                </div>
                <div id="trueOrFalseDiv" style="border-bottom: 1px lightgray solid;width: 100%;margin: 1px;float: left;"
                     @click="loadQuestions(3)"><span style="margin: 1%;margin-left: 5%;">判断题（{{paperStructure.trueOrFalseNum}}）</span><span
                        style="float: right;margin: 1%;margin-right: 20%;">{{paperStructure.trueOrFalseScore}}</span>
                </div>
                <div id="blankFillingDiv"
                     style="border-bottom: 1px lightgray solid;width: 100%;margin: 1px;float: left;"
                     @click="loadQuestions(4)"><span style="margin: 1%;margin-left: 5%;">填空题（{{paperStructure.blankFillingNum}}）</span><span
                        style="float: right;margin: 1%;margin-right: 20%;">{{paperStructure.blankFillingScore}}</span>
                </div>
                <div id="shortAnswerDiv" style="width: 100%;margin: 1px;float: left;" @click="loadQuestions(5)"><span
                        style="margin: 1%;margin-left: 5%;">简答题（{{paperStructure.shortAnswerNum}}）</span><span
                        style="float: right;margin: 1%;margin-right: 20%;">{{paperStructure.shortAnswerScore}}</span>
                </div>
            </div>
            <div id="left-button" class="col-sm-12" style="float: right;text-align: center;margin-top: 50px;">
                <button class="btn btn-primary btn-block" data-toggle="modal" data-target="#myModal">自动组卷</button>
            </div>
            <!-- 模态框（Modal） -->
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h6 class="modal-title" id="myModalLabel">
                                自动组卷需要先选定题库
                            </h6>
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        </div>
                        <div class="modal-body">
                            <select v-model="questionBankId" class="form-control">
                                <option value="0">请选则题库</option>
                                <option v-for="questionBank in questionBanks" :value="questionBank.id">
                                    {{questionBank.label}}
                                </option>
                            </select>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" data-dismiss="modal" @click="autoFilling()">
                                开始组卷
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 右边放置具体的试卷试题 -->
        <div id="right" class="col-sm-8" style="height: 400px;">
            <!-- 单选题 -->
            <div id="singleChoiceTable" style="display: block;">
                <table class="table">
                    <thead>
                    <tr>
                        <td style="width: 10%;">题号</td>
                        <td style="width: 30%;">试题名称</td>
                        <td style="width: 10%;">题库</td>
                        <td style="width: 10%;">分值</td>
                        <td style="width: 15%;">试题标签</td>
                        <td style="width: 25%;">操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(singleChoice,index) in singleChoices">
                        <td>{{index+1}}</td>
                        <td>{{singleChoice.content}}</td>
                        <td>{{singleChoice.bankLabel}}</td>
                        <td>
                            <div class="input-group input-group-sm">
                                <input type="number" v-model="singleChoiceScore_1" @change="changeStructure(1)"
                                       class="form-control"
                                       style="border: 0px; border-bottom: 1px lightgray solid;height:20px">
                            </div>
                        </td>
                        <td>{{singleChoice.label.name}}</td>
                        <td>
                            <span @click="questionUp(index,1)">上移</span>
                            <span @click="questionRemove(index,1)">删除</span>
                            <span @click="questionDown(index,1)">下移</span>
                        </td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <button data-toggle="modal" data-target="#addSingleChoiceModal"
                                    class="btn btn-outline-primary btn-block"
                                    style=" border: 1px lightblue dashed;color: lightgray;">+ 添加试题
                            </button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <!-- 模态框 -->
                <div class="modal fade" id="addSingleChoiceModal" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <select v-model="questionBankId" class="form-control">
                                    <option value="0">请选则题库</option>
                                    <option v-for="questionBank in questionBanks" :value="questionBank.id">
                                        {{questionBank.label}}
                                    </option>
                                </select>
                                <button class="btn btn-outline-primary" @click="listQuestions(1)">查询试题</button>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="row pre-scrollable">
                                    <table id="addSingleChoiceTable" class="table table-border">
                                        <thead>
                                        <tr>
                                            <td>试题名称</td>
                                            <td>试题标签</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="singleChoice in singleChoices_1">
                                            <td>{{singleChoice.content}}</td>
                                            <td>{{singleChoice.label.name}}</td>
                                            <td>
                                                <span class="addQuestion" @click="addQuestionToPaper(singleChoice,1)">添加到试卷</span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-primary" data-dismiss="modal" @click="OkClear(1)">
                                    确定
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 多选题 -->
            <div id="multipleChoiceTable" style="display: none;">

                <table class="table">
                    <thead>
                    <tr>
                        <td style="width: 10%;">题号</td>
                        <td style="width: 30%;">试题名称</td>
                        <td style="width: 10%;">题库</td>
                        <td style="width: 10%;">分值</td>
                        <td style="width: 15%;">试题标签</td>
                        <td style="width: 25%;">操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(multipleChoice,index) in multipleChoices">
                        <td>{{index+1}}</td>
                        <td>{{multipleChoice.content}}</td>
                        <td>{{multipleChoice.bankLabel}}</td>
                        <td>
                            <div class="input-group input-group-sm">
                                <input type="number" v-model="multipleChoiceScore_1" @change="changeStructure(2)"
                                       class="form-control"
                                       style="border: 0px; border-bottom: 1px lightgray solid;height:20px">
                            </div>
                        </td>
                        <td>{{multipleChoice.label.name}}</td>
                        <td>
                            <span @click="questionUp(index,2)">上移</span>
                            <span @click="questionRemove(index,2)">删除</span>
                            <span @click="questionDown(index,2)">下移</span>
                        </td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <button data-toggle="modal" data-target="#addmultipleChoiceModal"
                                    class="btn btn-outline-primary btn-block"
                                    style=" border: 1px lightblue dashed;color: lightgray;">+ 添加试题
                            </button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <!-- 模态框 -->
                <div class="modal fade" id="addmultipleChoiceModal" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <select v-model="questionBankId" class="form-control">
                                    <option value="0">请选则题库</option>
                                    <option v-for="questionBank in questionBanks" :value="questionBank.id">
                                        {{questionBank.label}}
                                    </option>
                                </select>
                                <button class="btn btn-outline-primary" @click="listQuestions(2)">查询试题</button>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="row pre-scrollable">
                                    <table id="addmultipleChoiceTable" class="table table-border">
                                        <thead>
                                        <tr>
                                            <td>试题名称</td>
                                            <td>试题标签</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="multipleChoice in multipleChoices_1">
                                            <td>{{multipleChoice.content}}</td>
                                            <td>{{multipleChoice.label.name}}</td>
                                            <td>
                                                <span class="addQuestion" @click="addQuestionToPaper(multipleChoice,2)">添加到试卷</span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-primary" data-dismiss="modal" @click="OkClear(2)">
                                    确定
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 判断题 -->
            <div id="trueOrFalseTable" style="display: none;">
                <table class="table">
                    <thead>
                    <tr>
                        <td style="width: 10%;">题号</td>
                        <td style="width: 30%;">试题名称</td>
                        <td style="width: 10%;">题库</td>
                        <td style="width: 10%;">分值</td>
                        <td style="width: 15%;">试题标签</td>
                        <td style="width: 25%;">操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(trueOrFalse,index) in trueOrFalses">
                        <td>{{index+1}}</td>
                        <td>{{trueOrFalse.content}}</td>
                        <td>{{trueOrFalse.bankLabel}}</td>
                        <td>
                            <div class="input-group input-group-sm">
                                <input type="number" v-model="trueOrFalseScore_1" @change="changeStructure(3)"
                                       class="form-control"
                                       style="border: 0px; border-bottom: 1px lightgray solid;height:20px">
                            </div>
                        </td>
                        <td>{{trueOrFalse.label.name}}</td>
                        <td>
                            <span @click="questionUp(index,3)">上移</span>
                            <span @click="questionRemove(index,3)">删除</span>
                            <span @click="questionDown(index,3)">下移</span>
                        </td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <button data-toggle="modal" data-target="#addTrueOrFalseModal"
                                    class="btn btn-outline-primary btn-block"
                                    style=" border: 1px lightblue dashed;color: lightgray;">+ 添加试题
                            </button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <!-- 模态框 -->
                <div class="modal fade" id="addTrueOrFalseModal" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <select v-model="questionBankId" class="form-control">
                                    <option value="0">请选则题库</option>
                                    <option v-for="questionBank in questionBanks" :value="questionBank.id">
                                        {{questionBank.label}}
                                    </option>
                                </select>
                                <button class="btn btn-outline-primary" @click="listQuestions(3)">查询试题</button>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="row pre-scrollable">
                                    <table id="addTrueOrFalseTable" class="table table-border">
                                        <thead>
                                        <tr>
                                            <td>试题名称</td>
                                            <td>试题标签</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="trueOrFalse in trueOrFalses_1">
                                            <td>{{trueOrFalse.content}}</td>
                                            <td>{{trueOrFalse.label.name}}</td>
                                            <td>
                                                <span class="addQuestion" @click="addQuestionToPaper(trueOrFalse,3)">添加到试卷</span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-primary" data-dismiss="modal" @click="OkClear(3)">
                                    确定
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 填空题 -->
            <div id="blankFillingTable" style="display: none;">
                <table class="table">
                    <thead>
                    <tr>
                        <td style="width: 10%;">题号</td>
                        <td style="width: 30%;">试题名称</td>
                        <td style="width: 10%;">题库</td>
                        <td style="width: 10%;">分值</td>
                        <td style="width: 15%;">试题标签</td>
                        <td style="width: 25%;">操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(blankFilling,index) in blankFillings">
                        <td>{{index+1}}</td>
                        <td>{{blankFilling.content}}</td>
                        <td>{{blankFilling.bankLabel}}</td>
                        <td>
                            <div class="input-group input-group-sm">
                                <input type="number" v-model="blankFillingScore_1" @change="changeStructure(4)"
                                       class="form-control"
                                       style="border: 0px; border-bottom: 1px lightgray solid;height:20px">
                            </div>
                        </td>
                        <td>{{blankFilling.label.name}}</td>
                        <td>
                            <span @click="questionUp(index,4)">上移</span>
                            <span @click="questionRemove(index,4)">删除</span>
                            <span @click="questionDown(index,4)">下移</span>
                        </td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <button data-toggle="modal" data-target="#addBlankFillingModal"
                                    class="btn btn-outline-primary btn-block"
                                    style=" border: 1px lightblue dashed;color: lightgray;">+ 添加试题
                            </button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <!-- 模态框 -->
                <div class="modal fade" id="addBlankFillingModal" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <select v-model="questionBankId" class="form-control">
                                    <option value="0">请选则题库</option>
                                    <option v-for="questionBank in questionBanks" :value="questionBank.id">
                                        {{questionBank.label}}
                                    </option>
                                </select>
                                <button class="btn btn-outline-primary" @click="listQuestions(4)">查询试题</button>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="row pre-scrollable">
                                    <table id="addblankFillingTable" class="table table-border">
                                        <thead>
                                        <tr>
                                            <td>试题名称</td>
                                            <td>试题标签</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="blankFilling in blankFillings_1">
                                            <td>{{blankFilling.content}}</td>
                                            <td>{{blankFilling.label.name}}</td>
                                            <td>
                                                <span class="addQuestion" @click="addQuestionToPaper(blankFilling,4)">添加到试卷</span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-primary" data-dismiss="modal" @click="OkClear(4)">
                                    确定
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 简答题 -->
            <div id="shortAnswerTable" style="display: none;">
                <table class="table">
                    <thead>
                    <tr>
                        <td style="width: 10%;">题号</td>
                        <td style="width: 30%;">试题名称</td>
                        <td style="width: 10%;">题库</td>
                        <td style="width: 10%;">分值</td>
                        <td style="width: 15%;">试题标签</td>
                        <td style="width: 25%;">操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(shortAnswer,index) in shortAnswers">
                        <td>{{index+1}}</td>
                        <td>{{shortAnswer.content}}</td>
                        <td>{{shortAnswer.bankLabel}}</td>
                        <td>
                            <div class="input-group input-group-sm">
                                <input type="number" v-model="shortAnswerScore_1" @change="changeStructure(5)"
                                       class="form-control"
                                       style="border: 0px; border-bottom: 1px lightgray solid;height:20px">
                            </div>
                        </td>
                        <td>{{shortAnswer.label.name}}</td>
                        <td>
                            <span @click="questionUp(index,5)">上移</span>
                            <span @click="questionRemove(index,5)">删除</span>
                            <span @click="questionDown(index,5)">下移</span>
                        </td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <button data-toggle="modal" data-target="#addshortAnswerModal"
                                    class="btn btn-outline-primary btn-block"
                                    style=" border: 1px lightblue dashed;color: lightgray;">+ 添加试题
                            </button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <!-- 模态框 -->
                <div class="modal fade" id="addshortAnswerModal" tabindex="-1" role="dialog"
                     aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <select v-model="questionBankId" class="form-control">
                                    <option value="0">请选则题库</option>
                                    <option v-for="questionBank in questionBanks" :value="questionBank.id">
                                        {{questionBank.label}}
                                    </option>
                                </select>
                                <button class="btn btn-outline-primary" @click="listQuestions(5)">查询试题</button>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="row pre-scrollable">
                                    <table id="addshortAnswerTable" class="table table-border">
                                        <thead>
                                        <tr>
                                            <td>试题名称</td>
                                            <td>试题标签</td>
                                            <td>操作</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="shortAnswer in shortAnswers_1">
                                            <td>{{shortAnswer.content}}</td>
                                            <td>{{shortAnswer.label.name}}</td>
                                            <td>
                                                <span class="addQuestion" @click="addQuestionToPaper(shortAnswer,5)">添加到试卷</span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-primary" data-dismiss="modal" @click="OkClear(5)">
                                    确定
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- ---- -->
        </div>
    </div>
    <!-- 底部 -->
    <div style="text-align: center;">
        <button class="btn btn-primary" @click="prvStep()">上一步</button>
        <button class="btn btn-primary" @click="savePaper(1)">存草稿</button>
        <button class="btn btn-primary" @click="savePaper(2)">发布</button>
    </div>
</div>
<script>
    new Vue({
        el: "#app",
        data: {
            paperStructure: {
                paperId: "",
                paperStructure: 0,
                questionTotalNum: 0,
                singleChoiceNum: 0,
                singleChoiceScore: 0,
                multipleChoiceNum: 0,
                multipleChoiceScore: 0,
                trueOrFalseNum: 0,
                trueOrFalseScore: 0,
                blankFillingNum: 0,
                blankFillingScore: 0,
                shortAnswerNum: 0,
                shortAnswerScore: 0,
            },
            questionBankId: "0",
            questionBanks: [],
            token: "",
            refreshToken: "",
            singleChoices: [],
            multipleChoices: [],
            trueOrFalses: [],
            blankFillings: [],
            shortAnswers: [],
            singleChoices_1: [],
            multipleChoices_1: [],
            trueOrFalses_1: [],
            blankFillings_1: [],
            shortAnswers_1: [],
            singleChoiceScore_1: 2,
            multipleChoiceScore_1: 3,
            trueOrFalseScore_1: 3,
            blankFillingScore_1: 5,
            shortAnswerScore_1: 10,
            question: {
                paperId: "",
                singleChoiceId: 0,
                multipleChoiceId: 0,
                trueOrFalseId: 0,
                blankFillingId: 0,
                shortAnswerId: 0,
                questionNum: 0
            },
            questions: [],
            storage: undefined
        },
        mounted() {
            this.storage = window.localStorage;
            this.token = this.storage.getItem("token");
            this.refreshToken = this.storage.getItem("refreshToken");
            window.changeStructure = this.changeStructure;
            window.getpaperAll=this.getpaperAll;
            this.paperStructure.paperId = window.location.href.split("=")[1];
            if (this.paperStructure.paperId == "") {
                alert("系统爆炸了，请重新请求");
                return;
            }
            axios.get("/exam/qb/all", {
                headers: {
                    "Content-Type": "application/json;charset=utf8",
                    "token": this.token,
                    "refreshToken": this.refreshToken
                }
            }).then(res => {
                console.log(res.data);
                if (res.data != null) {
                    this.questionBanks = res.data;
                    console.log(this.questionBanks);
                }
            });
            this.getpaperAll();
        },
        methods: {
            getpaperAll: function () {
                this.storage = window.localStorage;
                this.token = this.storage.getItem("token");
                this.refreshToken = this.storage.getItem("refreshToken");
                console.info(this.paperStructure.paperId);
                axios.get("/exam/paper/fullPaper/" + this.paperStructure.paperId, {
                    headers: {
                        "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                    }
                }).then(res => {
                    if (res.data.data != null) {
                        console.info(res.data);
                        console.info(res.data.data);
                        let paperall = res.data.data;
                        let strc = paperall.paperStructure;
                        console.info(strc)
                        if (paperall.singleChoices != null) {
                            this.singleChoices = paperall.singleChoices;
                        }
                        if (paperall.multipleChoices != null) {
                            this.multipleChoices = paperall.multipleChoices;
                        }
                        if (paperall.trueOrFalses != null) {
                            this.trueOrFalses = paperall.trueOrFalses;
                        }
                        if (paperall.blankFillings != null) {
                            this.blankFillings = paperall.blankFillings;
                        }
                        if (paperall.shortAnswers != null) {
                            this.shortAnswers = paperall.shortAnswers;
                        }
                        if (strc.singleChoiceScore != 0) {
                            this.paperStructure.singleChoiceScore = strc.singleChoiceScore;
                            this.singleChoiceScore_1 = strc.singleChoiceScore;
                        }
                        if (strc.multipleChoiceScore != 0) {
                            this.paperStructure.multipleChoiceScore = strc.multipleChoiceScore;
                            this.multipleChoiceScore_1 = strc.multipleChoiceScore;
                        }
                        if (strc.trueOrFalseScore != 0) {
                            this.paperStructure.trueOrFalseScore = strc.trueOrFalseScore;
                            this.trueOrFalseScore_1 = strc.trueOrFalseScore;
                        }
                        if (strc.blankFillingScore != 0) {
                            this.paperStructure.blankFillingScore = strc.completionScore;
                            this.blankFillingScore_1 = strc.completionScore;
                        }
                        if (strc.shortAnswerScore != 0) {
                            this.paperStructure.shortAnswerScore = strc.answerScore;
                            this.shortAnswerScore_1 = strc.answerScore;
                        }
                        this.changeStructure(1);
                        this.changeStructure(2);
                        this.changeStructure(3);
                        this.changeStructure(4);
                        this.changeStructure(5);
                    }
                })
            },
            loadQuestions: function (tipe) {
                //点击加载右边题库
                if (tipe == 1) {
                    $("#singleDiv").css("background-color", "#00ccff");
                    $("#multipleDiv").css("background-color", "white");
                    $("#trueOrFalseDiv").css("background-color", "white");
                    $("#blankFillingDiv").css("background-color", "white");
                    $("#shortAnswerDiv").css("background-color", "white");
                    $("#singleChoiceTable").css("display", "block");
                    $("#multipleChoiceTable").css("display", "none");
                    $("#trueOrFalseTable").css("display", "none");
                    $("#blankFillingTable").css("display", "none");
                    $("#shortAnswerTable").css("display", "none");
                    //   alert(1)
                }
                if (tipe == 2) {
                    $("#singleDiv").css("background-color", "white");
                    $("#multipleDiv").css("background-color", "#00ccff");
                    $("#trueOrFalseDiv").css("background-color", "white");
                    $("#blankFillingDiv").css("background-color", "white");
                    $("#shortAnswerDiv").css("background-color", "white");
                    $("#singleChoiceTable").css("display", "none");
                    $("#multipleChoiceTable").css("display", "block");
                    $("#trueOrFalseTable").css("display", "none");
                    $("#blankFillingTable").css("display", "none");
                    $("#shortAnswerTable").css("display", "none");
                    // alert(2)
                }
                if (tipe == 3) {
                    $("#singleDiv").css("background-color", "white");
                    $("#multipleDiv").css("background-color", "white");
                    $("#trueOrFalseDiv").css("background-color", "#00ccff");
                    $("#blankFillingDiv").css("background-color", "white");
                    $("#shortAnswerDiv").css("background-color", "white");
                    $("#singleChoiceTable").css("display", "none");
                    $("#multipleChoiceTable").css("display", "none");
                    $("#trueOrFalseTable").css("display", "block");
                    $("#blankFillingTable").css("display", "none");
                    $("#shortAnswerTable").css("display", "none");
                    //alert(3)
                }
                if (tipe == 4) {
                    $("#singleDiv").css("background-color", "white");
                    $("#multipleDiv").css("background-color", "white");
                    $("#trueOrFalseDiv").css("background-color", "white");
                    $("#blankFillingDiv").css("background-color", "#00ccff");
                    $("#shortAnswerDiv").css("background-color", "white");
                    $("#singleChoiceTable").css("display", "none");
                    $("#multipleChoiceTable").css("display", "none");
                    $("#trueOrFalseTable").css("display", "none");
                    $("#blankFillingTable").css("display", "block");
                    $("#shortAnswerTable").css("display", "none");
                    //     alert(4)
                }
                if (tipe == 5) {
                    $("#singleDiv").css("background-color", "white");
                    $("#multipleDiv").css("background-color", "white");
                    $("#trueOrFalseDiv").css("background-color", "white");
                    $("#blankFillingDiv").css("background-color", "white");
                    $("#shortAnswerDiv").css("background-color", "#00ccff");
                    $("#singleChoiceTable").css("display", "none");
                    $("#multipleChoiceTable").css("display", "none");
                    $("#trueOrFalseTable").css("display", "none");
                    $("#blankFillingTable").css("display", "none");
                    $("#shortAnswerTable").css("display", "block");
                    //   alert(5)
                }
            },
            autoFilling: function () {
                //点击弹出框，然后选择题库并且提交，自动生成试卷并返回来
                console.log(this.questionBankId)
                if (this.questionBankId == 0) {
                    return;
                } else {
                    this.token = this.storage.getItem("token");
                    this.refreshToken = this.storage.getItem("refreshToken");
                    axios.post("/exam/paper/completePaperAuto", {
                        "questionBankId": this.questionBankId,
                        "id": this.paperStructure.paperId
                    }, {
                        headers: {
                            "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                        }
                    }).then(res => {
                        console.info(res.data);
                        if (res.data.code == 200) {
                            alert("ok");
                        }
                    })
                }
            },
            listQuestions: function (tipe) {
                this.token = this.storage.getItem("token");
                this.refreshToken = this.storage.getItem("refreshToken");
                if (tipe == 1) {
                    axios.post("/exam/sc/search", {
                        "bankId": this.questionBankId
                    }, {
                        headers: {
                            "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                        }
                    }).then(res => {
                        if (res.data != null) {
                            console.info(res.data);
                            var singles = res.data;
                            var banks = this.questionBanks;
                            //加上题库标签
                            for (var i = 0; i < singles.length; i++) {
                                for (var j = 0; j < banks.length; j++) {
                                    if (singles[i].bankId == banks[j].id) {
                                        singles[i].bankLabel = banks[j].label;
                                        break;
                                    }
                                }
                            }
                            this.singleChoices_1 = singles;
                        }
                    });
                }
                if (tipe == 2) {
                    axios.post("/exam/mc/search", {
                        "bankId": this.questionBankId
                    }, {
                        headers: {
                            "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                        }
                    }).then(res => {
                        if (res.data != null) {
                            console.info(res.data);
                            var multiples = res.data;
                            var banks = this.questionBanks;
                            //加上题库标签
                            for (var i = 0; i < multiples.length; i++) {
                                for (var j = 0; j < banks.length; j++) {
                                    if (multiples[i].bankId == banks[j].id) {
                                        multiples[i].bankLabel = banks[j].label;
                                        break;
                                    }
                                }
                            }
                            this.multipleChoices_1 = multiples;
                        }
                    });
                }
                if (tipe == 3) {
                    axios.post("/exam/tof/search", {
                        "bankId": this.questionBankId
                    }, {
                        headers: {
                            "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                        }
                    }).then(res => {
                        if (res.data != null) {
                            console.info(res.data);
                            var tfs = res.data;
                            var banks = this.questionBanks;
                            //加上题库标签
                            for (var i = 0; i < tfs.length; i++) {
                                for (var j = 0; j < banks.length; j++) {
                                    if (tfs[i].bankId == banks[j].id) {
                                        tfs[i].bankLabel = banks[j].label;
                                        break;
                                    }
                                }
                            }
                            this.trueOrFalses_1 = tfs;
                        }
                    });
                }
                if (tipe == 4) {
                    axios.post("/exam/bf/search", {
                        "bankId": this.questionBankId
                    }, {
                        headers: {
                            "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                        }
                    }).then(res => {
                        if (res.data != null) {
                            console.info(res.data);
                            var blankfs = res.data;
                            var banks = this.questionBanks;
                            //加上题库标签
                            for (var i = 0; i < blankfs.length; i++) {
                                for (var j = 0; j < banks.length; j++) {
                                    if (blankfs[i].bankId == banks[j].id) {
                                        blankfs[i].bankLabel = banks[j].label;
                                        break;
                                    }
                                }
                            }
                            this.blankFillings_1 = blankfs;
                        }
                    });
                }
                if (tipe == 5) {
                    axios.post("/exam/sa/search", {
                        "bankId": this.questionBankId
                    }, {
                        headers: {
                            "Content-Type": "application/json;charset=utf8",
                            "token": this.token,
                            "refreshToken": this.refreshToken
                        }
                    }).then(res => {
                        if (res.data != null) {
                            console.info(res.data);
                            var shortas = res.data;
                            var banks = this.questionBanks;
                            //加上题库标签
                            for (var i = 0; i < shortas.length; i++) {
                                for (var j = 0; j < banks.length; j++) {
                                    if (shortas[i].bankId == banks[j].id) {
                                        shortas[i].bankLabel = banks[j].label;
                                        break;
                                    }
                                }
                            }
                            this.shortAnswers_1 = shortas;
                        }
                    });
                }
            },
            //向对应试题集中增加试题
            addQuestionToPaper: function (question, tipe) {
                //向表格中增加数据
                if (tipe == 1) {
                    this.singleChoices.push(question);
                }
                if (tipe == 2) {
                    this.multipleChoices.push(question);
                }
                if (tipe == 3) {
                    this.trueOrFalses.push(question);
                }
                if (tipe == 4) {
                    this.blankFillings.push(question);
                }
                if (tipe == 5) {
                    this.shortAnswers.push(question);
                }
            },
            //模态框清空退出，并且更新试卷结构中对应题型的数量
            OkClear: function (tipe) {
                //清空查询数组并退出
                if (tipe == 1) {
                    this.singleChoices_1 = [];
                    changeStructure(1);
                }
                if (tipe == 2) {
                    this.multipleChoices_1 = [];
                    changeStructure(2);
                }
                if (tipe == 3) {
                    this.trueOrFalses_1 = [];
                    changeStructure(3);
                }
                if (tipe == 4) {
                    this.blankFillings_1 = [];
                    changeStructure(4);
                }
                if (tipe == 5) {
                    this.shortAnswers_1 = [];
                    changeStructure(5);
                }
            },
            //更新试卷结构中的对应题型的总分
            changeStructure: function (tipe) {
                if (tipe == 1) {
                    this.paperStructure.singleChoiceNum = this.singleChoices.length;
                    this.paperStructure.singleChoiceScore = this.paperStructure.singleChoiceNum * this.singleChoiceScore_1;
                }
                if (tipe == 2) {
                    this.paperStructure.multipleChoiceNum = this.multipleChoices.length;
                    this.paperStructure.multipleChoiceScore = this.paperStructure.multipleChoiceNum * this.multipleChoiceScore_1;
                }
                if (tipe == 3) {
                    this.paperStructure.trueOrFalseNum = this.trueOrFalses.length;
                    this.paperStructure.trueOrFalseScore = this.paperStructure.trueOrFalseNum * this.trueOrFalseScore_1;
                }
                if (tipe == 4) {
                    this.paperStructure.blankFillingNum = this.blankFillings.length;
                    this.paperStructure.blankFillingScore = this.paperStructure.blankFillingNum * this.blankFillingScore_1;
                }
                if (tipe == 5) {
                    this.paperStructure.shortAnswerNum = this.shortAnswers.length;
                    this.paperStructure.shortAnswerScore = this.paperStructure.shortAnswerNum * this.shortAnswerScore_1;
                }

                this.paperStructure.questionTotalNum = this.paperStructure.singleChoiceNum + this.paperStructure.multipleChoiceNum + this.paperStructure.trueOrFalseNum + this.paperStructure.blankFillingNum + this.paperStructure.shortAnswerNum;
                this.paperStructure.questionTotalScore = this.paperStructure.singleChoiceScore + this.paperStructure.multipleChoiceScore + this.paperStructure.trueOrFalseScore + this.paperStructure.blankFillingScore + this.paperStructure.shortAnswerScore;
            },
            //上移试题
            questionUp(index, tipe) {
                if (tipe == 1) {
                    if (index == 0) {
                        alert("已经是第一个")
                    } else {
                        var temp = this.singleChoices;
                        var temp_1 = temp[index];
                        temp[index] = temp[index - 1];
                        temp[index - 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.singleChoices = temp;
                        this.singleChoices.push(temp_1);
                        this.singleChoices.splice(this.singleChoices.length - 1, 1);
                    }
                }
                if (tipe == 2) {
                    if (index == 0) {
                        alert("已经是第一个")
                    } else {
                        var temp = this.multipleChoices;
                        var temp_1 = temp[index];
                        temp[index] = temp[index - 1];
                        temp[index - 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.multipleChoices = temp;
                        this.multipleChoices.push(temp_1);
                        this.multipleChoices.splice(this.multipleChoices.length - 1, 1);
                    }
                }
                if (tipe == 3) {
                    if (index == 0) {
                        alert("已经是第一个")
                    } else {
                        var temp = this.trueOrFalses;
                        var temp_1 = temp[index];
                        temp[index] = temp[index - 1];
                        temp[index - 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.trueOrFalses = temp;
                        this.trueOrFalses.push(temp_1);
                        this.trueOrFalses.splice(this.trueOrFalses.length - 1, 1);
                    }
                }
                if (tipe == 4) {
                    if (index == 0) {
                        alert("已经是第一个")
                    } else {
                        var temp = this.blankFillings;
                        var temp_1 = temp[index];
                        temp[index] = temp[index - 1];
                        temp[index - 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.blankFillings = temp;
                        this.blankFillings.push(temp_1);
                        this.blankFillings.splice(this.blankFillings.length - 1, 1);
                    }
                }
                if (tipe == 5) {
                    if (index == 0) {
                        alert("已经是第一个")
                    } else {
                        var temp = this.shortAnswers;
                        var temp_1 = temp[index];
                        temp[index] = temp[index - 1];
                        temp[index - 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.shortAnswers = temp;
                        this.shortAnswers.push(temp_1);
                        this.shortAnswers.splice(this.shortAnswers.length - 1, 1);
                    }
                }

            },
            //删除试题
            questionRemove(index, tipe) {
                if (tipe == 1) {
                    this.singleChoices.splice(index, 1);
                    changeStructure(1);
                }
                if (tipe == 2) {
                    this.multipleChoices.splice(index, 1);
                    changeStructure(2);
                }
                if (tipe == 3) {
                    this.trueOrFalses.splice(index, 1);
                    changeStructure(3);
                }
                if (tipe == 4) {
                    this.blankFillings.splice(index, 1);
                    changeStructure(4);
                }
                if (tipe == 5) {
                    this.shortAnswers.splice(index, 1);
                    changeStructure(5);
                }

            },
            //下移试题
            questionDown(index, tipe) {
                if (tipe == 1) {
                    if (index == this.singleChoices.length - 1) {
                        alert("已经是最后一行")
                    } else {
                        var temp = this.singleChoices;
                        var temp_1 = temp[index];
                        temp[index] = temp[index + 1];
                        temp[index + 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.singleChoices = temp;
                        this.singleChoices.push(temp_1);
                        this.singleChoices.splice(this.singleChoices.length - 1, 1);
                    }
                }
                if (tipe == 2) {
                    if (index == this.multipleChoices.length - 1) {
                        alert("已经是最后一行")
                    } else {
                        var temp = this.multipleChoices;
                        var temp_1 = temp[index];
                        temp[index] = temp[index + 1];
                        temp[index + 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.multipleChoices = temp;
                        this.multipleChoices.push(temp_1);
                        this.multipleChoices.splice(this.multipleChoices.length - 1, 1);
                    }
                }
                if (tipe == 3) {
                    if (index == this.trueOrFalses.length - 1) {
                        alert("已经是最后一行")
                    } else {
                        var temp = this.trueOrFalses;
                        var temp_1 = temp[index];
                        temp[index] = temp[index + 1];
                        temp[index + 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.trueOrFalses = temp;
                        this.trueOrFalses.push(temp_1);
                        this.trueOrFalses.splice(this.trueOrFalses.length - 1, 1);
                    }
                }
                if (tipe == 4) {
                    if (index == this.blankFillings.length - 1) {
                        alert("已经是最后一行")
                    } else {
                        var temp = this.blankFillings;
                        var temp_1 = temp[index];
                        temp[index] = temp[index + 1];
                        temp[index + 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.blankFillings = temp;
                        this.blankFillings.push(temp_1);
                        this.blankFillings.splice(this.blankFillings.length - 1, 1);
                    }
                }
                if (tipe == 5) {
                    if (index == this.shortAnswers.length - 1) {
                        alert("已经是最后一行")
                    } else {
                        var temp = this.shortAnswers;
                        var temp_1 = temp[index];
                        temp[index] = temp[index + 1];
                        temp[index + 1] = temp_1;
                        temp[index].changeTimes = 1;
                        this.shortAnswers = temp;
                        this.shortAnswers.push(temp_1);
                        this.shortAnswers.splice(this.shortAnswers.length - 1, 1);
                    }
                }
            },
            //返回上一步，修改试卷基本信息
            prvStep: function () {
                window.location.href = "./addPaper_1.html?paperId=" + this.paperStructure.paperId;
            },
            savePaper(tipe) {
                var flag = false;
                //将试题打包
                var num = 1;
                for (var i = 0; i < this.singleChoices.length; i++) {
                    var temp = new Object;
                    temp.paperId = this.paperStructure.paperId;
                    temp.singleChoiceId = this.singleChoices[i].id;
                    temp.questionNum = num;
                    this.questions.push(temp);
                    num++;
                }
                for (var i = 0; i < this.multipleChoices.length; i++) {
                    var temp = new Object;
                    temp.paperId = this.paperStructure.paperId;
                    temp.multipleChoiceId = this.multipleChoices[i].id;
                    temp.questionNum = num;
                    this.questions.push(temp);
                    num++;
                }
                for (var i = 0; i < this.trueOrFalses.length; i++) {
                    var temp = new Object;
                    temp.paperId = this.paperStructure.paperId;
                    temp.trueOrFalseId = this.trueOrFalses[i].id;
                    temp.questionNum = num;
                    this.questions.push(temp);
                    num++;
                }
                for (var i = 0; i < this.blankFillings.length; i++) {
                    var temp = new Object;
                    temp.paperId = this.paperStructure.paperId;
                    temp.blankFillingId = this.blankFillings[i].id;
                    temp.questionNum = num;
                    this.questions.push(temp);
                    num++;
                }
                for (var i = 0; i < this.shortAnswers.length; i++) {
                    var temp = new Object;
                    temp.paperId = this.paperStructure.paperId;
                    temp.shortAnswerId = this.shortAnswers[i].id;
                    temp.questionNum = num;
                    this.questions.push(temp);
                    num++;
                }
                console.info(this.questions);
                console.info(num)
                //先存试卷结构
                this.token = this.storage.getItem("token");
                this.refreshToken = this.storage.getItem("refreshToken");
                axios.post("/exam/paper/insertStructure", {
                    "paperId": this.paperId,
                    "questionTotalScore": this.questionTotalScore,
                    "questionTotalNum": this.questionTotalNum,
                    "answerScore": this.shortAnswerScore,
                    "answerNum": this.shortAnswerNum,
                    "completionScore": this.blankFillingScore,
                    "completionNum": this.blankFillingNum,
                    "trueOrFalseScore": this.trueOrFalseScore,
                    "trueOrFalseNum": this.trueOrFalseNum,
                    "multipleChoiceScore": this.multipleChoiceScore,
                    "multipleChoiceNum": this.multipleChoiceNum,
                    "singleChoiceScore": this.singleChoiceScore,
                    "singleChoiceNum": this.singleChoiceNum
                }, {
                    headers: {
                        "Content-Type": "application/json;charset=utf8",
                        "token": this.token,
                        "refreshToken": this.refreshToken
                    }
                }).then(res => {
                    console.info(res.data);
                    if (res.data.code == 200) {
                        alert("ok");
                        this.token = this.storage.getItem("token");
                        this.refreshToken = this.storage.getItem("refreshToken");
                        axios.post("/exam/paper/completePaper", {
                            "id": this.paperStructure.paperId,
                            "questions": this.questions
                        }, {
                            headers: {
                                "Content-Type": "application/json;charset=utf8",
                                "token": this.token,
                                "refreshToken": this.refreshToken
                            }
                        }).then(res => {
                            if (res.data.code == 200) {
                                console.info("成功了，盒饭盒饭~~")
                                flag = true;
                            }
                            if (flag) {
                                this.token = this.storage.getItem("token");
                                this.refreshToken = this.storage.getItem("refreshToken");
                                var url1 = "";
                                //发布
                                if (tipe == 1) {
                                    url1 = "/exam/paper/updateStatus/1/" + this.paperStructure.paperId;
                                }
                                //存草稿
                                if (tipe == 2) {
                                    url1 = "/exam/paper/updateStatus/2/" + this.paperStructure.paperId;
                                }
                                axios.get(url1, {
                                    headers: {
                                        "Content-Type": "application/json;charset=utf8",
                                        "token": this.token,
                                        "refreshToken": this.refreshToken
                                    }
                                }).then(res => {
                                    if (res.data.code == 200) {
                                        console.info("更改成功");
                                        this.getpaperAll();
                                    }
                                })
                            }
                        })


                    }
                })
                //再将试题与试卷绑定

            }
        }
    })
</script>
</body>

</html>